<script>
    function DataBaseSelected()
    {
        var val = $("[name='ddlDatabases']").val();
        if(val != 0)
            $("#dataBases").trigger("submit");	
    }
    function TableSelected()
    {
        var val = $("[name='ddlTables']").val();
        if(val !=0 )
            $("#tables").trigger("submit");
    }
</script>


<a class="selectedTile LimeBG white" href="#page=home">

</a>
<h2 class="pageTitle">Entity Page</h2>
<div class="clear"></div>


<div class="content">
    Remember to removed initialization of database in Grid
    <form id="dataBases">
        <input type="hidden" name="request" value="getAllTablesForDB" />
        Database: <select id="ddlDatabases" name="ddlDatabases" onchange="DataBaseSelected()"></select><br>
    </form>

    <form id="tables">
        <input type="hidden" name="request" value="getAllColumnsFromTable" />
        Tables: <select id="ddlTables" name="ddlTables" onchange="TableSelected()"></select>
    </form>

    <form id="generate">
        <input type="hidden" name="request" value="generateEntity" />
        <input type="submit" name="submit" value="Generate" class="button" />
    </form>

    <div id="columns"></div>
</div>

